package com.shepin.base;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import com.shepin.Util.MyDate;
import com.shepin.Util.SharedPrefenceUtils;
import com.shepin.Util.Var;
import com.shepin.R;

/**
 * Created by apple on 16/7/28.
 */
public class BaseActivity extends Activity implements View.OnClickListener{
    public SharedPrefenceUtils spUtils;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);//去掉标题栏
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉信息栏
    }

    @Override
    public void onClick(View view) {

    }
    protected void animLeftToRight() {
        try {
            overridePendingTransition(R.anim.push_left_in, R.anim.push_left_out);
        } catch (Exception e) {
        }
    }
    protected void animRightToLeft() {
        try {
            overridePendingTransition(R.anim.push_right_in2, R.anim.push_right_to2);
        } catch (Exception e) {
        }
    }
    public static void Log_info(String log) {
        Log.i(Var.info, "-----> " + MyDate.getDateEN() + " : " + log);
    }

    public static void Log_error(String log) {
        Log.e(Var.error, "-----> " + MyDate.getDateEN() + " : " + log);
    }

    public static void Log_warn(String log) {
        Log.w(Var.warn, "-----> " + MyDate.getDateEN() + " : " + log);
    }

}
